﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<TanHungViet.Helper.PaginatedList<TanHungViet.Web.Models.Content>>" %>
<%@ Import Namespace="System.Globalization" %>
<%@ Import Namespace="TanHungViet.Helper"%>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=ViewData["PageTitle"]%> - TÂN HƯNG VIỆT - HOTLINE: 0835.125.795
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
   <script type="text/javascript">
       function ChiTiet(code) {
           document.getElementById(code).href = '/ChiTietDuAn/' + code;
           return false;
       }
    </script>
    <% CultureInfo ci = new CultureInfo(Session["CultureInfo"].ToString());%>
    
    <div class="title-mainright">
	    <h2 class="text1" style="text-transform:uppercase;"><%=ViewData["PageTitle"]%></h2>
	</div>
	
	<div class="content">
	    <script type="text/javascript" src='<%=Url.Content("~/Scripts/main.js")%>'></script>
	    <script type="text/javascript" src='<%=Url.Content("~/Scripts/jquery.js")%>'></script>
		<div class="top-box2"><img src='<%=Url.Content("~/Content/images/top-box2.jpg")%>'/> </div>		
			<div class="center-box2" style="line-height:15px;">
			    <% int i = 1; %>
			    <% foreach(var item in Model)
                { %>
                <div class="Block01">
                    <div class="title"><span><a href='<%=Url.Action("ChiTietDuAn", new { code = item.ContentCode }) %>'><%= item.ContentTitle %></a></span> </div>
                    <div class="NewsList">
                         <a href='<%= item.ContentImage!=null ? Url.Content(Constant.ImageContentPath + item.ContentImage)
                                    : ""%>' class="preview" onclick="ChiTiet('<%=item.ContentCode %>')" id="<%=item.ContentCode %>">
                         <img src='<%= item.ContentImage!=null ? Url.Content(Constant.ImageContentPath + item.ContentImage)
                                    : ""%>' alt=""  width="320px" height="200px"/></a>
		                <%--<div class="Descrip">
		                    <span style="color:red;font-weight:bold;"><%= ResourceUtil.Instance.GetString("ChuDauTu", ci) %> :</span>
		                    <%=item.Investor %>
		                    <br />
		                    <span style="color:red;font-weight:bold;"><%= ResourceUtil.Instance.GetString("DiaChi", ci) %> :</span> 
		                    <%=item.Address %>
		                    <br />
		                    <span style="color:red;font-weight:bold;"><%= ResourceUtil.Instance.GetString("ThietKe", ci) %> :</span> 
		                    <%=item.Designer %>
                        </div>--%>
                        
                    </div> 
                </div>
                
                <%if (i % 2 == 0)
                  { %>
                  <div class="hinhphanchia">
                    <img src='<%=Url.Content("~/Content/images/hinhphanchia.jpg")%>' alt=""  width="400px"/>
                   </div>
                <%} %>
                
                <%i++;
                } %>
                <div style="clear:both"></div>
                <% if (ViewData["ContentCode"] != "home-page")
                   { %>
                <div style="text-align:right;color:#2222FF">
                    <b><%= ResourceUtil.Instance.GetString("Trang", ci)%> : </b> 
                    <% 
                    for (int j = Model.PageIndex - 3; j < Model.PageIndex + 6; j++)
                        if (j > 0 && j <= Model.TotalPages)
                        {
                            if (j != Model.PageIndex + 1)
                                Response.Write(Html.ActionLink(j.ToString(), "ThietKe", new
                                {
                                    code = ViewData["ContentCode"],
                                    page = j
                                }));
                            else
                                Response.Write(j.ToString());

                            if (j < Model.TotalPages)
                                Response.Write("&nbsp;|&nbsp;");
                        }
                    %>
                </div>
                <%} %>
			</div>            	

        <div class="bottom-box2"><img src='<%=Url.Content("~/Content/images/bottom-box2.jpg")%>'	></div>
	</div> 
     
</asp:Content>

